﻿<Window x:Class="SplitButtonWpfSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:splitButton="clr-namespace:Delay;assembly=SplitButtonWpf"
        Title="SplitButtonWpfSample">
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="20"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <TextBlock
            Grid.Column="0"
            Grid.Row="0"
            Text="SplitButton"
            FontWeight="Bold"
            HorizontalAlignment="Center"
            Margin="5"/>
        <Grid
            Grid.Column="0"
            Grid.Row="1">
            <splitButton:SplitButton Content="Open" Click="Open_Click">
                <splitButton:SplitButton.ButtonMenuItemsSource>
                    <MenuItem Header="Open" Click="Open_Click"/>
                    <MenuItem Header="Open read-only" Click="OpenReadOnly_Click"/>
                    <MenuItem Header="Open as copy" Click="OpenCopy_Click"/>
                </splitButton:SplitButton.ButtonMenuItemsSource>
            </splitButton:SplitButton>
        </Grid>

        <TextBlock
            Grid.Column="2"
            Grid.Row="0"
            Text="MenuButton"
            FontWeight="Bold"
            HorizontalAlignment="Center"
            Margin="5"/>
        <Grid
            Grid.Column="2"
            Grid.Row="1">
            <splitButton:MenuButton Content="Format">
                <splitButton:MenuButton.ButtonMenuItemsSource>
                    <MenuItem Header="Font..." Click="FormatFont_Click"/>
                    <MenuItem Header="Paragraph..." Click="FormatParagraph_Click"/>
                    <MenuItem Header="Tabs..." Click="FormatTabs_Click"/>
                </splitButton:MenuButton.ButtonMenuItemsSource>
            </splitButton:MenuButton>
        </Grid>
    </Grid>
</Window>
